<template>
  <div>
    <p>
      {{ shopName }} <button @click="$emit('input', value + 1)">+</button>
      {{ value }}
      <button @click="cut">-</button>
    </p>
  </div>
</template>

<script>
export default {
  //   name: "",
  components: {},
  props: {
    shopName: {
      type: String,
      require: true,
    },
    value: {
      type: Number,
      require: true,
    },
  },
  data() {
    return {};
  },
  computed: {},
  watch: {},
  created() {},
  methods: {
    cut() {
      this.value > 0 ? this.$emit("input", this.value - 1) : 0;
    },
  },
};
</script>

<style lang="less" scoped></style>
